package com.expection;

import java.io.FileReader;

// 使用try-with-resource JDK7之后
public class Test03 {
    public static void main(String[] args) {
        try(FileReader reader = new FileReader("d:/a.txt");){
        char c = (char)reader.read();
        char c2 = (char)reader.read();
        char c3 = (char)reader.read();

        System.out.println(""+c+c2+c3);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
